<?php
namespace App\Module\User\Service;

use App\Model\News;

class NewsService {

    public function search($pagesize){
        return News::query()->latest("new_id")->paginate($pagesize);
    }

    public function getById($id){
        return News::query()->with("resources")->find($id);
    }
}